home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / tools / czesc_4 / smallmath / smallmath.doc < prev    next >
Text File  |  1993-01-24  |  4KB  |  75 lines

  1.  
  2.  
  3.                 Small Math Libraries
  4.                    v. 1.2
  5.            Public domain software by Laz Marhenke
  6.  
  7.  
  8. I. Legal stuff:
  9.    These libraries are public domain. Do as you will with them (except, of
  10. course, copyright them).
  11.  
  12. II. The Software:
  13.    The enclosed libraries (mathieeesingtrans.library,
  14. mathieeedoubbas.library, and mathieeedoubtrans.library) are replacements
  15. for the IEEE math libraries that come with the Amiga for users who have a
  16. math coprocessor (68881, 68882, or 68040) installed in their system. They
  17. should be "plug-compatible"; i.e., just copy them into your LIBS: drawer
  18. and go. Unlike the originals, however, these libraries will *not* work if
  19. you don't have a math coprocessor -- they will, in fact, certainly crash
  20. your machine. The advantage to using these libraries over the
  21. Commodore-supplied ones is that these are 60-90% smaller. The space savings
  22. was realized by not including any code in the libraries for use when a
  23. coprocessor is not available. Note that these libraries are no faster than
  24. the Commodore libraries (which already make use of a coprocessor when one
  25. is available), just smaller (but see below).
  26.    To install the libraries, execute the included script "Install_Libs"
  27. (using "execute" from a shell window or by double-clicking on the icon from
  28. the Workbench). The script will copy the small math libraries into your
  29. LIBS: drawer, overwriting the old versions. For this reason, make sure you
  30. are working with a copy of your Workbench disk. Alternately, you can just
  31. copy them manually by whatever method you like.
  32.  
  33. III. Bugs (Features?):
  34.    This version (1.2) is intended to correct a rather embarrassing bug that
  35. got through in the version 1.1a Cmp() function in the
  36. mathieeedoubbas.library. The effect of the bug was that the compare gave
  37. the wrong result for two unequal negative arguments. Thanks to
  38. Rainer Koehler for finding the bug and sending me an annotated bit of C
  39. code which nicely patched the hole in my own testing. I also squeezed a few
  40. microseconds out of the Tst() function, and cleaned up the source a little.
  41. The other two libraries (the transcendental libraries) are essentially
  42. identical to those distributed as version 1.1a, but have been relinked
  43. using the SAS 6.0 release, which makes them a few bytes smaller.
  44.    Keep in mind that to actually begin using the libraries you may have to
  45. reboot your system after installing them, since other programs (AREXX in
  46. particular) may have already opened some of them, and the computer won't
  47. reload the library from disk if it's already in memory.
  48.    The only other thing to be concerned about is a possible incompatibility
  49. in the Pow() function. The Pow() function in the Commodore-supplied
  50. transcendental libraries did not behave well (to my mind) when given
  51. unusual input. By "unusual", I mean things like negative numbers to
  52. infinite powers, or positive infinity to the zero power, etc. The most
  53. common response of the routine was to return zero -- in many of these cases
  54. the wrong answer. However, in at least one case (I think it was raising a
  55. negative number to the negative infinity power, but I no longer remember),
  56. the Commodore-supplied routine simply crashed. I decided that this was
  57. unacceptable, and so did not reproduce this behavior in my libraries. The
  58. Pow() function I wrote tries its best to return a reasonable number given
  59. unreasonable inputs (a positive number to the negative infinity power
  60. should be zero, for example). When no reasonable answer is possible (e.g.,
  61. -4^0.5), it returns NaN (not-a-number). Somehow, in doing this, I managed
  62. to write a Pow() routine which is about twice as fast as the one in the
  63. original libraries. Naturally this made me suspicious that I had missed
  64. something, but I've tested the function with every combination of inputs
  65. that I can come up with and it works fine.
  66.    I have taken the liberty of making these libraries versions 37.2, and
  67. 37.3, since as far as I can tell, they contain all the functions that the
  68. v.37 libraries do.
  69.    With any other bugs or problems, you can contact me via e-mail at
  70. laz@leland.stanford.edu . (My physical address varies slightly more rapidly
  71. than my e-mail address.)
  72.  
  73.  
  74.  
  75.